<!DOCTYPE html>
<html>
	<head>
		<meta charset="UTF-8">
		<title></title>
		<style type="text/css">
			img{
				position: absolute;
			}
		</style>
	</head>
	<body>
		<img src="img/goods01.jpg" id="img" style="width: 100px; height: 100px;"/>
	</body>
	<script type="text/javascript">
		window.onload=function(){
			//在窗口绑定鼠标移动事件
			window.onmousemove=function(e){
//				console.log('123');
                console.log(e)
                var img=document.getElementById('img');
                img.style.left=e.pageX-50+'px';
                img.style.top=e.pageY-50+'px';
			}
			
			
			
		}
	</script>
</html>
